package spittr.config;

import static spittr.tool.PubFun.getArray;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class SpittrWebAppInit extends AbstractAnnotationConfigDispatcherServletInitializer
{

    @SuppressWarnings("unchecked")
    @Override
    protected Class<?>[] getRootConfigClasses()
    {
        return getArray(RootConfig.class);
    }

    @SuppressWarnings("unchecked")
    @Override
    protected Class<?>[] getServletConfigClasses()
    {
        return getArray(WebConfig.class);
    }

    @Override
    protected String[] getServletMappings()
    {
        // 将DispatcherServlet映射到 根目录
        return getArray("/");
    }
}
